<template>
  <div id="app" @touchmove="handleTouch">
    <van-icon name="arrow-left" id="back_to" @click="back_to">返回</van-icon>
    <router-view />
  </div>
</template>

<script>
// import VConsole from 'vconsole'

export default {
  mounted() {
    if (
      this.$common.xeUtils.locat().host != 'dalianyqschoolmobile.lngov.top' ||
      this.$store.state.user.userInfo.card_no == '210302200001212713'
    ) {
      // new VConsole()
    }
  },

  // ios上拉空白
  created() {
    document.body.addEventListener(
      'touchmove',
      (e) => {
        if (e._isScroller) return
        e.preventDefault()
      },
      {
        passive: false,
      }
    )
  },

  methods: {
    handleTouch(e) {
      e._isScroller = true
    },
    back_to() {
      this.$router.back()
    },
  },
}
</script>

<style lang="less">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #2c3e50;
  background: #f2f2f2;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
}

html,
body {
  height: 100%;
  overflow: hidden;
}
#back_to {
  display: block;
  position: absolute;
  left: 0;
  top: 0;
  height: 1em;
  line-height: 1em;
  padding: 0.3em;
  z-index: 200;
  color: #f7daa6;
  mix-blend-mode: difference;
}
</style>
